﻿@{
    ViewBag.Title = "ListPartial";
    Layout = "";
}
@model PagedList<Common.Background.WebManageRoles>
 
<table>
    <tr>
        <th width="100"></th>
        <th>编号
        </th>
        <th>角色名称
        </th>
        <th>所属部门
        </th>
        <th>状态
        </th>
        <th>操作权限
        </th>
        <th>所属部门
        </th>
    </tr>
    <tbody>
        @if (Model != null && Model.Count() > 0)
        {
            foreach (var item1 in Model)
            {
            <tr>
                <td>
                    @Html.AuthorityHtmlTags(OperatorAuthority.Deleted | OperatorAuthority.Read,
                    @<span>
                        @Html.ActionLink("详细", "Details", new { id = item1.ManageRoleID })
                        @Html.ActionLink("删除", "Delete", new { id = item1.ManageRoleID })
                    </span>)

                    @Html.AuthorityHtmlTags(OperatorAuthority.Modify,
                    @<span>@Html.ActionLink("编辑", "Edit", new { id = item1.ManageRoleID })</span>)
                </td>
                <td>
                    @item1.ManageRoleID
                </td>
                <td>
                    @item1.RoleName
                </td>
                <td>
                    @item1.WebDepartments.DepartmentName
                </td>
                <td>
                    @(((EntityFrameworks.Entity.Core.CommonEnums.Status)item1.Status).GetDescription())
                </td>
                <td>
                    @(((OperatorAuthority)item1.OperatorAuthority).GetDescription())
                </td>
                <td>@item1.WebDepartments.DepartmentName
                </td>
            </tr>
            }
        }
        else
        {
            <tr>
                <td colspan="7">没有相关信息
                </td>
            </tr>
        }
    </tbody>
    <tfoot>
        <tr>
            <td colspan="7">@EntityFrameworks.Web.Core.Helper.PagerHelper.AjaxPager(Html, Model, "divlist", "Index", "Role")
            </td>
        </tr>
    </tfoot>
</table>
